<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title></title>
  <script src="lib/jquery.min.js"></script>
  <script src="lib/angular.min.js"></script>
  <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
</head>
<body>
  <div class="container" ng-controller="AwardCtrl">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">中奖名单</h3>
      </div>
      <div class="panel-body row">
        <table class="table table-striped table-hover">
          <thead>
            <tr>
              <th class="col-lg-1">状态</th>
              <th class="col-lg-1">奖品</th>
              <th class="col-lg-7">中奖名单</th>
              <th class="col-lg-1">时间</th>
              <th class="col-lg-2">操作</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="item in list">
              <td ng-class="{danger:item.status}">{{getStatus(item.status)}}</td>
              <td>{{item.name}}</td>
              <td>
                {{getNames(item.winners)}}
              </td>
              <td>{{item.created_at | date: "MM-dd HH:mm:ss"}}</td>
              <td>
                <div class="btn-group" role="group">
                  <button type="button" class="btn btn-default" ng-click="cancel(item.id, item.status)">撤销</button>
                  <button type="button" class="btn btn-default" ng-click="recover(item.id, item.status)">恢复</button>
                </div>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>

  <script src="js/controller.js"></script>
  <script>
    angular.bootstrap(document, ['lottery'])
  </script>
</body>
</html>